package com.rustic.server.dto;

import cn.xy.commons.validator.MobilePhone;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.rustic.server.dto.base.RusticBaseDTO;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 表[rustic]对应UpdateDTO类
 *
 * @author auto
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class RusticUpdateDTO extends RusticBaseDTO {
    /**
     * 自增ID
     */
    @NotNull(message = "id不能为空")
    @Min(value = 1, message = "id不能为空")
    @ApiModelProperty(value = "自增ID", dataType = "Integer")
    private Integer id;

    /**
     * 联系人手机号码
     */
    @MobilePhone
    @Length(min = 0, max = 11, message = "联系人手机号码长度为0-11个字符")
    @ApiModelProperty(value = "联系人手机号码", dataType = "String")
    private String mobile;

    /**
     * 乡村名
     */
    @NotEmpty(message = "乡村名不能为空")
    @Length(min = 0, max = 100, message = "乡村名长度为1-100个字符")
    @ApiModelProperty(value = "乡村名", dataType = "String")
    private String name;

    /**
     * 简介
     */
    @NotEmpty(message = "简介不能为空")
    @Length(min = 0, max = 200, message = "简介长度为1-200个字符")
    @ApiModelProperty(value = "简介", dataType = "String")
    private String briefIntro;

    /**
     * 介绍
     */
    @NotEmpty(message = "介绍不能为空")
    @ApiModelProperty(value = "介绍", dataType = "String")
    private String introduce;

    /**
     * 地区
     */
    @NotEmpty(message = "地区不能为空")
    @Length(min = 0, max = 500, message = "地区长度为1-500个字符")
    @ApiModelProperty(value = "地区", dataType = "String")
    private String address;

    /**
     * 详细地址
     */
    @Length(min = 0, max = 500, message = "详细地址长度为0-500个字符")
    @ApiModelProperty(value = "详细地址", dataType = "String")
    private String detailedAddress;

    /**
     * 封面
     */
    @NotEmpty(message = "封面不能为空")
    @Length(min = 0, max = 500, message = "封面长度为1-500个字符")
    @ApiModelProperty(value = "封面", dataType = "String")
    private String cover;

    /**
     * 图片(轮播图)
     */
    @Length(min = 0, max = 500, message = "图片(轮播图)长度为0-500个字符")
    @ApiModelProperty(value = "图片(轮播图)", dataType = "String")
    private String images;

}
